package com.lebang.model.enums;

/**
 * 新手任务统计类型
 * @className PushMsgEnum
 * @author hwq
 * @date
 */
public enum NewHandTaskEnum {

	/**
	 *  新手任务
	 */
	XSND("小试牛刀", 1),
	NEW_HAND("新手红包", 5),
	EARN_WAY("赚钱攻略", 6),
	INSTALL("开安装权限", 7),
	ACCESS("开访问权限", 20),
	PUSH("开推送权限", 21),
	PICTURE("截图任务", 38),
	DEMO("试玩任务", 39),
	HIGH("高额任务", 40),
	WECHAT("微信小程序任务", 41),
	GAME_DEMO("多游试玩", 42),
	PC_EGG("PC蛋蛋", 43),
	ENJOY_GAME("聚享玩", 44),
	GOLD_DEMO("91淘金试玩", 45),
	SOSO("搜搜任务", 46),
	SOSO_DOG("搜搜糯米狗任务", 47),
	SOSO_FISH("完成搜搜兼职咸鱼任务", 48),
	EARN_DAY("每日必赚", 49),
	NEWS("新闻赚", 50),
	JOY("笑话赚", 51),
	ACCESS_OPEN("访问权限开启", 52),
	WALK("走路赚", 57),
	FISH_BOX("鱼玩盒子", 54),
	SECOND_EARN_DAY("第二次每日必赚",61),
	THIRD_EARN_DAY("第三次每日必赚",62),
	;

	private String title;
	private int index;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	private NewHandTaskEnum(String title, int index) {
		this.title = title;
		this.index = index;
	}
	
	public NewHandTaskEnum getByIndex(int index) {
		for (NewHandTaskEnum e : NewHandTaskEnum.values()) {
			if (e.index == index) {
				return e;
			}
		}
		return null;
	}
	
	public NewHandTaskEnum getByTitle(String title) {
		if (null == title) {
			return null;
		}
		for (NewHandTaskEnum e : NewHandTaskEnum.values()) {
			if (e.title.equals(title)) {
				return e;
			}
		}
		return null;
	}
}
